package at.ac.univie.zsu.aguataplan.dao;

import java.util.List;

/**
 * basic services to access data
 * 
 * @author gerry
 * 
 */
public interface Dao {
	public <T> void clearTable(Class<T> c);

	public void persist(Object o) throws Exception;

	public <T> T find(Class<T> c, Long id) throws Exception;

	public <T> List<T> findAll(Class<T> c) throws Exception;

	public <T> void remove(Class<T> t, long id) throws Exception;

	public void flush() throws Exception;

	public void clear() throws Exception;

	public <T> long count(Class<T> c) throws Exception;

	public <T> T merge(T c) throws Exception;

	public <T> List<T> findEntries(Class<T> c, int firstResult, int maxResults);
}
